class Fix
{
	static function ref(obj:Object, funct:Function):Function
	{
		var f:Function = function():Function
		{
			var target:Object = arguments.callee['target'];
			var func:Function = arguments.callee['func'];

			return func['apply'](target, arguments);
		};

		f['target'] = obj;
		f['func'] = funct;

		return f;
	}
}
